//
//  HKScaleCycleView.h
//  HKUtilities
//
//  Created by 胡锦涛 on 2018/11/12.
//  Copyright © 2018 胡锦涛. All rights reserved.
/*
 两边留边的比例轮播图
 使用：
 HKScaleCycleView *cycleView = [[HKScaleCycleView alloc]initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width * .5) WithAnimationDuration:3];
 cycleView.isCycle = 1;
 cycleView.scaleNum = 0.9;
 cycleView.imgWidth = [UIScreen mainScreen].bounds.size.width * .8;
 cycleView.cornerSize = 10;//cornerSize>0 则设置圆角
 //cycleView.placeHolderImage = @"星宝0.jpg";
 //cycleView.imgArr = @[@"http://",@"http://",@"http://"];
 cycleView.imgArr = @[@"星宝0.jpg",@"星宝1.jpg",@"星宝2.jpg",@"星宝3.jpg"];
 cycleView.backgroundColor = kRANDOM_COLOR;
 [self.view addSubview:cycleView];
 
 */

#import <UIKit/UIKit.h>
#import "NSTimer+HKExtension.h"

NS_ASSUME_NONNULL_BEGIN

@interface HKScaleCycleView : UIView
@property (nonatomic,strong)UIScrollView *scrollView;
/**定时器**/
@property (nonatomic , strong) NSTimer *animationTimer;
/**显示图片**/
@property (nonatomic,strong)NSArray *imgArr;
/**图片宽度**/
@property (nonatomic,assign)CGFloat imgWidth;
/**缩放的倍率**/
@property (nonatomic,assign)CGFloat scaleNum;
/**圆角大小**/
@property (nonatomic,assign)CGFloat cornerSize;
/**轮播占位图**/
@property (nonatomic,strong)NSString *placeHolderImage;
/**图片是否为轮播，只有图片大于2张才能循环**/
@property (nonatomic,assign)NSInteger isCycle;

/**点击了第几张**/
@property (nonatomic,copy)void (^imgOnClick)(NSInteger index);

/**滑动到第几张**/
@property (nonatomic,copy)void(^scrollPage)(NSInteger index);

/**初始化方法**/
- (id)initWithFrame:(CGRect)frame WithAnimationDuration:(NSTimeInterval)animationDuration;

@end

NS_ASSUME_NONNULL_END
